import Vue from 'vue'
import App from './App.vue'
// import Vant from 'vant'
// import 'vant/lib/index.css'
import router from './router'
import store from './store/store'
import 'amfe-flexible'
import { Button, Field, Form, Grid, GridItem, Icon, Search, Swipe, SwipeItem, Tabbar, TabbarItem, IndexBar, IndexAnchor, Tag, NavBar, Cell, CellGroup, Picker, Popup, Uploader, List } from 'vant'
// Vue.use(Vant)
Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Form)
Vue.use(Field)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Icon)
Vue.use(Search)
Vue.use(IndexBar)
Vue.use(IndexAnchor)
Vue.use(Tag)
Vue.use(NavBar)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(Picker)
Vue.use(Popup)
Vue.use(Uploader)
Vue.use(List)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

// const isLogin = true // 登录状态(未登录)
// router.beforeEach((to, from, next) => {
//   if (to.path === '/login' && isLogin === false) {
//     alert('请登录')
//     next(false) // 阻止路由跳转
//   } else {
//     next() // 正常放行
//   }
// })
